#include <iostream>

using namespace std;

int main()
{
    int countBit = 0;
    int temp = 1037;
    while (temp != 0)
    {
        int lastPos1 = temp & (~temp + 1);
        temp ^= lastPos1;
        countBit++;
    }
    cout << countBit << endl;
    system("pause");
    return 0;
}